package com.welinkdata.service;

import com.welinkdata.dao.UserMapper;
import com.welinkdata.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/8/18.
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public List<User> findAll(){
        return userMapper.findAll();
    }

    public User findById(int id){
        return userMapper.findById(id);
    }

    public void saveUser(String name,int age){
        userMapper.saveUser(name,age);
    }

}
